home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1996 July / WPCJUL96.ISO / file.exe / SHARED.DXR / 01020_ Utility functions.ls < prev    next >
Encoding:
Text File  |  1996-05-15  |  1.1 KB  |  70 lines

  1. on win_midiStart fileName
  2.   mci("close midi")
  3.   mci("open" && fileName && "alias midi")
  4.   mci("play midi")
  5.   if the result = EMPTY then
  6.     return 0
  7.   else
  8.     return 1
  9.   end if
  10. end
  11.  
  12. on win_midiPlaying
  13.   mci("status midi mode")
  14.   if the result = "playing" then
  15.     return 1
  16.   else
  17.     return 0
  18.   end if
  19. end
  20.  
  21. on win_midiStop
  22.   mci("close midi")
  23. end
  24.  
  25. on win_initialise
  26.   global runprog
  27.   openXLib("franks.dll")
  28.   if objectp(runprog) then
  29.     runprog(mdispose)
  30.   end if
  31.   set runprog to franks(mnew)
  32. end
  33.  
  34. on win_exit
  35.   global runprog
  36.   runprog(mdispose)
  37.   closeXLib("franks.dll")
  38. end
  39.  
  40. on win_RunProg fileName
  41.   global runprog
  42.   return runprog(mRun, fileName)
  43. end
  44.  
  45. on win_StillRunning runID
  46.   global runprog
  47.   return runprog(mActive, runID)
  48. end
  49.  
  50. on win_StopRunning runID
  51.   runprog(mGoAwayPlease, runID)
  52. end
  53.  
  54. on win_GetVersion
  55.   global gtswhichopsystem, runprog
  56.   set gtswhichopsystem to runprog(mGetWinVersion)
  57. end
  58.  
  59. on win_FilePresent fileName
  60.   return runprog(mChkFileThere, fileName)
  61. end
  62.  
  63. on win_NetScapeRunning
  64.   return runprog(mZapNscape, 0)
  65. end
  66.  
  67. on win_NetScapeDieDieDie
  68.   return runprog(mZapNscape, 1)
  69. end
  70.